|
A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. The earliest programming languages preceded the invention of the digital computer and were used to direct the behavior of machines such as Jacquard looms and player pianos.〔Ettinger, James (2004) ''Jacquard's Web'', Oxford University Press〕 Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. Many programming languages require computation to be specified in an imperative form (i.e., as a sequence of operations to perform), while other languages use other forms of program specification such as the declarative form (i.e. the desired result is specified, not how to achieve it). The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. ==Definitions== A programming language is a notation for writing programs, which are specifications of a computation or algorithm. Some, but not all, authors restrict the term "programming language" to those languages that can express ''all'' possible algorithms.〔〔In mathematical terms, this means the programming language is Turing-complete 〕 Traits often considered important for what constitutes a programming language include: ; Function and target : A ''computer programming language'' is a language used to write computer programs, which involve a computer performing some kind of computation〔, ''The scope of SIGPLAN is the theory, design, implementation, description, and application of computer programming languages - languages that permit the specification of a variety of different computations, thereby providing the user with significant control (immediate or delayed) over the computer's operation.''〕 or algorithm and possibly control external devices such as printers, disk drives, robots, and so on. For example, PostScript programs are frequently created by another program to control a computer printer or display. More generally, a programming language may describe computation on some, possibly abstract, machine. It is generally accepted that a complete specification for a programming language includes a description, possibly idealized, of a machine or processor for that language.〔R. Narasimahan, Programming Languages and Computers: A Unified Metatheory, pp. 189--247 in Franz Alt, Morris Rubinoff (eds.) Advances in computers, Volume 8, Academic Press, 1994, ISBN 0-12-012108-5, p.193 : "a complete specification of a programming language must, by definition, include a specification of a processor--idealized, if you will--for that language." (source cites many references to support this statement )〕 In most practical contexts, a programming language involves a computer; consequently, programming languages are usually defined and studied this way. Programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines. ; Abstractions : Programming languages usually contain abstractions for defining and manipulating data structures or controlling the flow of execution. The practical necessity that a programming language support adequate abstractions is expressed by the abstraction principle;〔David A. Schmidt, ''The structure of typed programming languages'', MIT Press, 1994, ISBN 0-262-19349-3, p. 32〕 this principle is sometimes formulated as recommendation to the programmer to make proper use of such abstractions. ; Expressive power : The theory of computation classifies languages by the computations they are capable of expressing. All Turing complete languages can implement the same set of algorithms. ANSI/ISO SQL-92 and Charity are examples of languages that are not Turing complete, yet often called programming languages.〔, ''Charity is a categorical programming language...'', ''All Charity computations terminate.''〕 Markup languages like XML, HTML or troff, which define structured data, are not usually considered programming languages.〔(XML in 10 points ) W3C, 1999, ''XML is not a programming language.''〕 Programming languages may, however, share the syntax with markup languages if a computational semantics is defined. XSLT, for example, is a Turing complete XML dialect.〔(【引用サイトリンク】title=What kind of language is XSLT? )〕〔(【引用サイトリンク】title=XSLT is a Programming Language )〕 Moreover, LaTeX, which is mostly used for structuring documents, also contains a Turing complete subset.〔http://tobi.oetiker.ch/lshort/lshort.pdf〕 The term ''computer language'' is sometimes used interchangeably with programming language.〔Robert A. Edmunds, The Prentice-Hall standard glossary of computer terminology, Prentice-Hall, 1985, p. 91〕 However, the usage of both terms varies among authors, including the exact scope of each. One usage describes programming languages as a subset of computer languages.〔Pascal Lando, Anne Lapujade, Gilles Kassel, and Frédéric Fürst, ''(Towards a General Ontology of Computer Programs )'', (ICSOFT 2007 ), pp. 163-170〕 In this vein, languages used in computing that have a different goal than expressing computer programs are generically designated computer languages. For instance, markup languages are sometimes referred to as computer languages to emphasize that they are not meant to be used for programming.〔S.K. Bajpai, ''Introduction To Computers And C Programming'', New Age International, 2007, ISBN 81-224-1379-X, p. 346〕 Another usage regards programming languages as theoretical constructs for programming abstract machines, and computer languages as the subset thereof that runs on physical computers, which have finite hardware resources.〔R. Narasimahan, Programming Languages and Computers: A Unified Metatheory, pp. 189--247 in Franz Alt, Morris Rubinoff (eds.) Advances in computers, Volume 8, Academic Press, 1994, ISBN 0-12-012108-5, p.215: "() the model () for computer languages differs from that () for programming languages in only two respects. In a computer language, there are only finitely many names--or registers--which can assume only finitely many values--or states--and these states are not further distinguished in terms of any other attributes. (footnote: ) This may sound like a truism but its implications are far reaching. For example, it would imply that any model for programming languages, by fixing certain of its parameters or features, should be reducible in a natural way to a model for computer languages."〕 John C. Reynolds emphasizes that formal specification languages are just as much programming languages as are the languages intended for execution. He also argues that textual and even graphical input formats that affect the behavior of a computer are programming languages, despite the fact they are commonly not Turing-complete, and remarks that ignorance of programming language concepts is the reason for many flaws in input formats.〔John C. Reynolds, ''Some thoughts on teaching programming and programming languages'', SIGPLAN Notices, Volume 43, Issue 11, November 2008, p.109〕 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Programming language」の詳細全文を読む スポンサード リンク
|